Integrand size = 18, antiderivative size = 119 \[ \int x^3 \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx=\frac {a^2 x^4}{4}+\frac {2 a b x^2 \arctan \left (e^{c+d x^2}\right )}{d}-\frac {b^2 \log \left (\cosh \left (c+d x^2\right )\right )}{2 d^2}-\frac {i a b \operatorname {PolyLog}\left (2,-i e^{c+d x^2}\right )}{d^2}+\frac {i a b \operatorname {PolyLog}\left (2,i e^{c+d x^2}\right )}{d^2}+\frac {b^2 x^2 \tanh \left (c+d x^2\right )}{2 d} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {5544, 4275, 4265, 2317, 2438, 4269, 3556} \[ \int x^3 \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx=\frac {a^2 x^4}{4}+\frac {2 a b x^2 \arctan \left (e^{c+d x^2}\right )}{d}-\frac {i a b \operatorname {PolyLog}\left (2,-i e^{d x^2+c}\right )}{d^2}+\frac {i a b \operatorname {PolyLog}\left (2,i e^{d x^2+c}\right )}{d^2}-\frac {b^2 \log \left (\cosh \left (c+d x^2\right )\right )}{2 d^2}+\frac {b^2 x^2 \tanh \left (c+d x^2\right )}{2 d} \]
[In]
[Out]
Rule 2317
Rule 2438
Rule 3556
Rule 4265
Rule 4269
Rule 4275
Rule 5544
Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int x (a+b \text {sech}(c+d x))^2 \, dx,x,x^2\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \left (a^2 x+2 a b x \text {sech}(c+d x)+b^2 x \text {sech}^2(c+d x)\right ) \, dx,x,x^2\right ) \\ & = \frac {a^2 x^4}{4}+(a b) \text {Subst}\left (\int x \text {sech}(c+d x) \, dx,x,x^2\right )+\frac {1}{2} b^2 \text {Subst}\left (\int x \text {sech}^2(c+d x) \, dx,x,x^2\right ) \\ & = \frac {a^2 x^4}{4}+\frac {2 a b x^2 \arctan \left (e^{c+d x^2}\right )}{d}+\frac {b^2 x^2 \tanh \left (c+d x^2\right )}{2 d}-\frac {(i a b) \text {Subst}\left (\int \log \left (1-i e^{c+d x}\right ) \, dx,x,x^2\right )}{d}+\frac {(i a b) \text {Subst}\left (\int \log \left (1+i e^{c+d x}\right ) \, dx,x,x^2\right )}{d}-\frac {b^2 \text {Subst}\left (\int \tanh (c+d x) \, dx,x,x^2\right )}{2 d} \\ & = \frac {a^2 x^4}{4}+\frac {2 a b x^2 \arctan \left (e^{c+d x^2}\right )}{d}-\frac {b^2 \log \left (\cosh \left (c+d x^2\right )\right )}{2 d^2}+\frac {b^2 x^2 \tanh \left (c+d x^2\right )}{2 d}-\frac {(i a b) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{c+d x^2}\right )}{d^2}+\frac {(i a b) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{c+d x^2}\right )}{d^2} \\ & = \frac {a^2 x^4}{4}+\frac {2 a b x^2 \arctan \left (e^{c+d x^2}\right )}{d}-\frac {b^2 \log \left (\cosh \left (c+d x^2\right )\right )}{2 d^2}-\frac {i a b \operatorname {PolyLog}\left (2,-i e^{c+d x^2}\right )}{d^2}+\frac {i a b \operatorname {PolyLog}\left (2,i e^{c+d x^2}\right )}{d^2}+\frac {b^2 x^2 \tanh \left (c+d x^2\right )}{2 d} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(324\) vs. \(2(119)=238\).
Time = 1.94 (sec) , antiderivative size = 324, normalized size of antiderivative = 2.72 \[ \int x^3 \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx=\frac {4 b^2 d e^{2 c} x^2+a^2 d^2 x^4+a^2 d^2 e^{2 c} x^4+4 i a b d x^2 \log \left (1-i e^{c+d x^2}\right )+4 i a b d e^{2 c} x^2 \log \left (1-i e^{c+d x^2}\right )-4 i a b d x^2 \log \left (1+i e^{c+d x^2}\right )-4 i a b d e^{2 c} x^2 \log \left (1+i e^{c+d x^2}\right )-2 b^2 \log \left (1+e^{2 \left (c+d x^2\right )}\right )-2 b^2 e^{2 c} \log \left (1+e^{2 \left (c+d x^2\right )}\right )-4 i a b \left (1+e^{2 c}\right ) \operatorname {PolyLog}\left (2,-i e^{c+d x^2}\right )+4 i a b \left (1+e^{2 c}\right ) \operatorname {PolyLog}\left (2,i e^{c+d x^2}\right )+2 b^2 d x^2 \text {sech}(c) \text {sech}\left (c+d x^2\right ) \sinh \left (d x^2\right )+2 b^2 d e^{2 c} x^2 \text {sech}(c) \text {sech}\left (c+d x^2\right ) \sinh \left (d x^2\right )}{4 d^2 \left (1+e^{2 c}\right )} \]
[In]
[Out]
\[\int x^{3} {\left (a +b \,\operatorname {sech}\left (d \,x^{2}+c \right )\right )}^{2}d x\]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 782 vs. \(2 (100) = 200\).
Time = 0.28 (sec) , antiderivative size = 782, normalized size of antiderivative = 6.57 \[ \int x^3 \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx=\frac {a^{2} d^{2} x^{4} + 4 \, b^{2} c + {\left (a^{2} d^{2} x^{4} + 4 \, b^{2} d x^{2} + 4 \, b^{2} c\right )} \cosh \left (d x^{2} + c\right )^{2} + 2 \, {\left (a^{2} d^{2} x^{4} + 4 \, b^{2} d x^{2} + 4 \, b^{2} c\right )} \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + {\left (a^{2} d^{2} x^{4} + 4 \, b^{2} d x^{2} + 4 \, b^{2} c\right )} \sinh \left (d x^{2} + c\right )^{2} - 4 \, {\left (-i \, a b \cosh \left (d x^{2} + c\right )^{2} - 2 i \, a b \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) - i \, a b \sinh \left (d x^{2} + c\right )^{2} - i \, a b\right )} {\rm Li}_2\left (i \, \cosh \left (d x^{2} + c\right ) + i \, \sinh \left (d x^{2} + c\right )\right ) - 4 \, {\left (i \, a b \cosh \left (d x^{2} + c\right )^{2} + 2 i \, a b \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + i \, a b \sinh \left (d x^{2} + c\right )^{2} + i \, a b\right )} {\rm Li}_2\left (-i \, \cosh \left (d x^{2} + c\right ) - i \, \sinh \left (d x^{2} + c\right )\right ) - 2 \, {\left (2 i \, a b c + {\left (2 i \, a b c + b^{2}\right )} \cosh \left (d x^{2} + c\right )^{2} + 2 \, {\left (2 i \, a b c + b^{2}\right )} \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + {\left (2 i \, a b c + b^{2}\right )} \sinh \left (d x^{2} + c\right )^{2} + b^{2}\right )} \log \left (\cosh \left (d x^{2} + c\right ) + \sinh \left (d x^{2} + c\right ) + i\right ) - 2 \, {\left (-2 i \, a b c + {\left (-2 i \, a b c + b^{2}\right )} \cosh \left (d x^{2} + c\right )^{2} + 2 \, {\left (-2 i \, a b c + b^{2}\right )} \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + {\left (-2 i \, a b c + b^{2}\right )} \sinh \left (d x^{2} + c\right )^{2} + b^{2}\right )} \log \left (\cosh \left (d x^{2} + c\right ) + \sinh \left (d x^{2} + c\right ) - i\right ) - 4 \, {\left (i \, a b d x^{2} + i \, a b c + {\left (i \, a b d x^{2} + i \, a b c\right )} \cosh \left (d x^{2} + c\right )^{2} + 2 \, {\left (i \, a b d x^{2} + i \, a b c\right )} \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + {\left (i \, a b d x^{2} + i \, a b c\right )} \sinh \left (d x^{2} + c\right )^{2}\right )} \log \left (i \, \cosh \left (d x^{2} + c\right ) + i \, \sinh \left (d x^{2} + c\right ) + 1\right ) - 4 \, {\left (-i \, a b d x^{2} - i \, a b c + {\left (-i \, a b d x^{2} - i \, a b c\right )} \cosh \left (d x^{2} + c\right )^{2} + 2 \, {\left (-i \, a b d x^{2} - i \, a b c\right )} \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + {\left (-i \, a b d x^{2} - i \, a b c\right )} \sinh \left (d x^{2} + c\right )^{2}\right )} \log \left (-i \, \cosh \left (d x^{2} + c\right ) - i \, \sinh \left (d x^{2} + c\right ) + 1\right )}{4 \, {\left (d^{2} \cosh \left (d x^{2} + c\right )^{2} + 2 \, d^{2} \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + d^{2} \sinh \left (d x^{2} + c\right )^{2} + d^{2}\right )}} \]
[In]
[Out]
\[ \int x^3 \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx=\int x^{3} \left (a + b \operatorname {sech}{\left (c + d x^{2} \right )}\right )^{2}\, dx \]
[In]
[Out]
\[ \int x^3 \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d x^{2} + c\right ) + a\right )}^{2} x^{3} \,d x } \]
[In]
[Out]
\[ \int x^3 \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d x^{2} + c\right ) + a\right )}^{2} x^{3} \,d x } \]
[In]
[Out]
Timed out. \[ \int x^3 \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx=\int x^3\,{\left (a+\frac {b}{\mathrm {cosh}\left (d\,x^2+c\right )}\right )}^2 \,d x \]
[In]
[Out]